﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GView;
using UFrame.BridgeUI;
using UFrame.BridgeUI.Binding;

public class AutoOpen : MonoBehaviour
{
    protected virtual void Awake()
    {
        var binding = GetComponent<BindingReference>();
        if (binding != null)
        {
            var scriptType = binding.LoadViewScriptType();
            var script = System.Activator.CreateInstance(scriptType) as ViewBase;
            script.Binding(gameObject);
        }
    }
}